from appium.webdriver.common.appiumby import AppiumBy
from base.search_base import *

class SearchPage(Searchbase):
    def search_bar_for_input_sent(self,driver,value):
        search_bar_for_input_xpath=self.search_bar_for_input()
        return self.element_sent_keys(driver,AppiumBy.XPATH,search_bar_for_input_xpath,value)

    def search_button_click(self,driver):
        search_button_xpath=self.search_button()
        return self.element_click_new(driver,AppiumBy.XPATH,search_button_xpath)

    def get_assert_value(self,driver):
        assert_value_xpath=self.book_title()
        return self.get_text(driver,AppiumBy.XPATH,assert_value_xpath)